package com.groupbuying.customer.service.impl;

import com.groupbuying.customer.dao.CustomerInStorkDao;
import com.groupbuying.customer.domain.CustomerInStorkDO;
import com.groupbuying.customer.service.CustomerInStorkService;
import com.groupbuying.customer.utils.apiresult.ApiResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigInteger;
import java.util.List;
import java.util.Map;



@Service
public class CustomerInStorkServiceImpl implements CustomerInStorkService {
	@Autowired
	private CustomerInStorkDao customerInStorkDao;
	
	@Override
	public CustomerInStorkDO get(BigInteger uuid){
		return customerInStorkDao.get(uuid);
	}
	
	@Override
	public List<CustomerInStorkDO> list(Map<String, Object> map){
		return customerInStorkDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return customerInStorkDao.count(map);
	}
	
	@Override
	public int save(CustomerInStorkDO customerInStork){
		return customerInStorkDao.save(customerInStork);
	}
	
	@Override
	public int update(CustomerInStorkDO customerInStork){
		return customerInStorkDao.update(customerInStork);
	}
	
	@Override
	public int remove(BigInteger uuid){
		return customerInStorkDao.remove(uuid);
	}
	
	@Override
	public int batchRemove(BigInteger[] uuids){
		return customerInStorkDao.batchRemove(uuids);
	}

	@Override
	public ApiResult getAll() {
		List<CustomerInStorkDO> customerInStorkDOList = customerInStorkDao.getAll();
		return ApiResult.success(customerInStorkDOList);
	}

}
